package com.jiazhong.mingxing.boot.boot02.bean;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.JdbcType;

import java.io.Serializable;

// 对应的表名
@TableName(value = "student", keepGlobalPrefix = true, excludeProperty = {"max"})
@Data
@NoArgsConstructor
public class Student implements Serializable {

    @TableId(value = "id")
    private Long id;
    @TableField(value = "name", select = true)
    private String name;
    @TableField(value = "stu_no", jdbcType = JdbcType.VARCHAR)
    private String stuNo;
    private String password;
    private Character gender;
    private String birthday;
    @TableField(value = "place_of_origin")
    private String placeOfOrigin;
    @TableField("enrollment_date")
    private String enrollmentDate;
    @TableField("school_id")
    private Long schoolId;
    @TableField("course_id")
    private Long courseId;
    // 第一种写法：局部写法
    // @TableLogic(delval = "1", value = "0")
    private Integer state;
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private String createTime;
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private String updateTime;

    private int max;
}
